package com.xszx.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 已办任务表
 * @TableName t_com_task
 */
@TableName(value ="t_com_task")
@Data
public class TComTask implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 申请人
     */
    private String applyName;

    /**
     * 任务名称
     */
    private String taskName;

    /**
     * 审批创建时间
     */
    private Date createTime;

    /**
     * 审批结束时间
     */
    private Date finishTime;

    /**
     * 任务主题
     */
    private String motif;

    /**
     * 审批人
     */
    private String approverName;

    /**
     * 任务状态  1：已审批  0：未审批
     */
    private Integer taskState;

    /**
     * 审批结果
     */
    private String result;

    /**
     * 部门名称
     */
    private String depName;

    /**
     * 文件路径
     */
    private String fileUrl;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TComTask other = (TComTask) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getApplyName() == null ? other.getApplyName() == null : this.getApplyName().equals(other.getApplyName()))
            && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
            && (this.getMotif() == null ? other.getMotif() == null : this.getMotif().equals(other.getMotif()))
            && (this.getApproverName() == null ? other.getApproverName() == null : this.getApproverName().equals(other.getApproverName()))
            && (this.getTaskState() == null ? other.getTaskState() == null : this.getTaskState().equals(other.getTaskState()))
            && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()))
            && (this.getDepName() == null ? other.getDepName() == null : this.getDepName().equals(other.getDepName()))
            && (this.getFileUrl() == null ? other.getFileUrl() == null : this.getFileUrl().equals(other.getFileUrl()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getApplyName() == null) ? 0 : getApplyName().hashCode());
        result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
        result = prime * result + ((getMotif() == null) ? 0 : getMotif().hashCode());
        result = prime * result + ((getApproverName() == null) ? 0 : getApproverName().hashCode());
        result = prime * result + ((getTaskState() == null) ? 0 : getTaskState().hashCode());
        result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
        result = prime * result + ((getDepName() == null) ? 0 : getDepName().hashCode());
        result = prime * result + ((getFileUrl() == null) ? 0 : getFileUrl().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", applyName=").append(applyName);
        sb.append(", taskName=").append(taskName);
        sb.append(", createTime=").append(createTime);
        sb.append(", finishTime=").append(finishTime);
        sb.append(", motif=").append(motif);
        sb.append(", approverName=").append(approverName);
        sb.append(", taskState=").append(taskState);
        sb.append(", result=").append(result);
        sb.append(", depName=").append(depName);
        sb.append(", fileUrl=").append(fileUrl);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}